<template>
	<view>
		<scroll-view scroll-y="true" class="scroll-Y">
			<uni-collapse accordion>
				<uni-collapse-item :key="index" v-for="(item,index) of inspectionData" :title="item.title">
					<view class="content" style="padding: 0 0rpx 40rpx 20rpx;">
						<view class="inspection_text">
							反馈内容:<text class="text_center">{{item.jihua}}</text>
						</view>
					</view>
				</uni-collapse-item>
			</uni-collapse>
		</scroll-view>
		<u-popup :show="show" mode="center" :round="10" @close="show = false">
			<view style="width: 80vw;">
				<view class="popup_title">
					意见反馈
				</view>
				<view class="" style="padding: 22rpx 60rpx;">
					<view class="popup_text">
						反馈标题
					</view>
					<u--input placeholder="请输入反馈标题" border="surround" v-model="popupValue"></u--input>
					<view class="popup_text">
						反馈内容
					</view>
					<u--textarea v-model="popupTextarea" placeholder="请输入反馈内容"></u--textarea>
					<view class="popup_btn">
						<u-button @tap="submit" type="primary" text="确定"></u-button>
					</view>

				</view>

			</view>
		</u-popup>
		<view class="inspection_bottom">
			<view class="bottom_btn" @tap="bottomBtn()">
				意见反馈
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				inspectionData: [{
					title: '息县污水站巡检',
					jihua: '每周二,周五',
				}],
				show: false,
				popupValue: '',
				popupTextarea: ''
			}
		},
		methods: {
			bottomBtn() {
				this.show = true
			},
			submit() {
				if(this.popupValue&&this.popupTextarea){
						this.show = false
					console.log(this.popupValue,this.popupTextarea)
				}else{
					uni.showToast({
						icon: "none",
						title: '标题或内容不能为空',
						duration: 1000,
					})
				}
			}
		}
	}
</script>

<style scoped lang="scss">
	.scroll-Y {
		height: calc(86vh);
	}

	.inspection_text {
		font-size: 30rpx;
		padding: 10rpx 0;
		font-weight: bold;
	}

	.text_center {
		padding-left: 20rpx;
		font-weight: 400;
	}

	.inspection_text1 {
		font-size: 26rpx;
		color: #9e9e9e;
	}

	.inspection_bottom {
		position: fixed;
		height: 120rpx;
		width: 100%;
		bottom: 0;
		left: 0;

		.bottom_btn {
			font-size: 30rpx;
			width: 85%;
			margin: auto;
			background-color: #007aff;
			color: white;
			text-align: center;
			padding: 20rpx 0;
			border-radius: 30rpx;
		}
	}

	.popup_title {
		text-align: center;
		padding: 30rpx 0;
		font-size: 30rpx;
		border-bottom: 1px solid gainsboro;
	}

	.popup_text {
		padding: 20rpx 0;
		font-size: 30rpx;
	}

	.popup_btn {
		margin-top: 50rpx;
	}
</style>